/* 暂时存放到这的， 用来设置 container video 的基本样式 */
container {
  position: relative;
  -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}

container,
video {
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
  outline: none;
}

video:focus {
  outline: none;
}

/* 用到的变量 */
:root {
  --barColor: #de698c;
  --trackColor: #4c4c4c;
}

/* 全局默认样式 */
.chimee-flex-component svg g {
  fill: #fff;
  stroke: #fff;
}

.chimee-flex-component svg:hover g {
  fill: #fff;
  stroke: #fff;
}

/* 默认隐藏 */
chimee-control-state-pause,
chimee-control-state-play,
chimee-screen-full,
chimee-clarity-list,
chimee-screen-small {
  display: none;
}

/* 满足条件时显示 */
chimee-control.full chimee-screen-full,
chimee-control.small chimee-screen-small,
chimee-control.pause chimee-control-state-pause,
chimee-control.play chimee-control-state-play,
chimee-control.full chimee-screen-full,
chimee-control.small chimee-screen-small {
  display: inline-block;
  width: 1.4em;
  height: 100%;
}

/* 开始写具体样式 */
chimee-control {
  position: absolute;
  bottom: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 4em;
  font-size: 10px;
  user-select: none;
  overflow: hidden;
  font-family: Roboto, Arial, Helvetica, sans-serif;
  transition: visibility 0.5s ease;
}

chimee-control:focus {
  outline: none;
}

chimee-control-wrap {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 4em;
  line-height: 4em;
  display: flex;
  flex-flow: row nowrap;
  justify-content: flex-start;
  align-items: flex-start;
  background: rgba(0, 0, 0, 0.5);
  transition: bottom 0.5s ease;
  pointer-events: auto;
}

.chimee-flex-component {
  order: 1;
  flex-grow: 0;
  height: 4em;
  cursor: pointer;
}

.chimee-flex-component svg {
  vertical-align: middle;
  width: 1.8em;
  height: 1.8em;
}

/* 播放器状态，播放／暂停 */
chimee-control-state.chimee-flex-component {
  flex-basis: 3em;
  text-align: right;
  margin-right: 1em;
}

/* 播放器状态，播放／暂停 动画效果 */
chimee-control-state .left,
chimee-control-state .right {
  transition: d 0.2s ease-in-out;
}

/* 时间显示 */
chimee-current-time.chimee-flex-component,
chimee-total-time.chimee-flex-component {
  color: #fff;
  font-size: 1.5em;
  font-weight: normal;
  text-align: center;
  white-space: nowrap;
}

chimee-current-time + chimee-total-time::before {
  content: "/";
  padding: 4px;
}

/* 播放器控制条 */
chimee-progressbar.chimee-flex-component {
  position: relative;
  flex-grow: 1;
  margin: 0 1.5em;
  pointer-events: none;
}

.chimee-progressbar-line {
  position: absolute;
  top: 1.8em;
  left: 0;
  display: inline-block;
  height: 8px;
  border-radius: 4px;
}

chimee-progressbar-bg {
  width: 100%;
  background: var(--trackColor);
}

chimee-progressbar-buffer {
  width: 0;
  background: #6f6f6f;
}

chimee-progressbar-all {
  background: var(--barColor);
}

chimee-progressbar-ball {
  content: '';
  position: absolute;
  right: -1em;
  top: -0.4em;
  display: inline-block;
  width: 1.4em;
  height: 1.4em;
  border-radius: 1.4em;
  background: #fff;
  pointer-events: none;
}

/* 全屏 */
chimee-screen.chimee-flex-component {
  flex-basis: 3em;
  text-align: left;
  margin-left: 1em;
}
